/**
 * @brief 风扇
 */
#pragma once

#include "BridgedDevice.h"

class Fan: public BridgedDevice {
public:
    static constexpr DeviceTypeId kDeviceTypeFan = 0x002B;
    explicit Fan(const BasicInformation *node);

    Protocols::InteractionModel::Status ReadAttribute(
            ClusterId clusterId,
            AttributeId attributeId,
            uint8_t* buffer,
            uint16_t maxReadLength) override;

    Protocols::InteractionModel::Status WriteAttribute(
            ClusterId clusterId,
            const EmberAfAttributeMetadata* attributeMetadata,
            uint8_t* buffer) override;

    ChipError OnReport(const DataBlock* message) override;

private:
    uint8_t mPercent{};
    uint8_t mMode;
};


